How to remove duplicates from the sorted array

welcome to shbcf.ru